package com.sino.operation.service.impl;

import cn.hutool.json.JSONUtil;
import com.sino.operation.entity.BizAccountmanageInfo;
import com.sino.operation.entity.BizTranslist;
import com.sino.operation.entity.SysAbMessage;
import com.sino.operation.mapper.BizAccountmanageInfoMapper;
import com.sino.operation.mapper.BizOperateLogMapper;
import com.sino.operation.mapper.BizTranslistMapper;
import com.sino.operation.mapper.SysAbMessageMapper;
import com.sino.operation.service.BizAccountmanageInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sino.operation.vo.PublicInfo;
import com.sino.operation.vo.current.CurrentStartMarkParam;
import com.sino.operation.vo.current.CurrentStartReceiveParam;
import com.sino.operation.vo.current.InfoInput;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * <p>
 * 账管登记簿表 服务实现类
 * </p>
 *
 * @author admin
 * @since 2021-10-07
 */
@Service
public class BizAccountmanageInfoServiceImpl extends ServiceImpl<BizAccountmanageInfoMapper, BizAccountmanageInfo> implements BizAccountmanageInfoService {

    @Autowired
    private StringRedisTemplate redisTemplate;

    @Autowired(required = false)
    private SysAbMessageMapper sysAbMessageMapper;

    @Autowired(required = false)
    private BizTranslistMapper bizTranslistMapper;

    @Autowired(required = false)
    private BizOperateLogMapper BizOperateLogMapper;

    @Override
    public String startAccountRecord(CurrentStartReceiveParam currentStartReceiveParam) {
  /*      //region 取出传递过来的参数
        PublicInfo publicInfo = currentStartReceiveParam.getPublicInfo();
        CurrentStartMarkParam currentStartMarkParam = currentStartReceiveParam.getCurrentStartMarkParam();
        List<InfoInput> infoInputs = currentStartReceiveParam.getInfoInputs();
        //endregion
        SysAbMessage sysAbMessage = new SysAbMessage();
        String jsonStr = JSONUtil.toJsonStr(currentStartReceiveParam);
        sysAbMessage.setMessageAccept(jsonStr).setMessage(jsonStr);
        BizTranslist bizTranslist = new BizTranslist();

        //region 取出内容，建立对象，存入数据
        String orgCode = publicInfo.getOrgCode();
        String orgName = publicInfo.getOrgName();
        String tellerCode = publicInfo.getTellerCode();
        String tellerName = publicInfo.getTellerName();
        String tranCode = publicInfo.getTranCode();
        String tranDate = publicInfo.getTranDate();
        String tranTimeStamp = publicInfo.getTranTimeStamp();
        String channelId = publicInfo.getChannelId();
        String imageId = publicInfo.getImageId();
        String businessType = publicInfo.getBusinessType();
        String centerNo = publicInfo.getCenterNo();
        bizTranslist.setCenterNo(centerNo).setOrgCode(orgCode).setTransCode(tranCode)
                .setImageId(imageId).setTransDate(tranDate).setTransTime(tranTimeStamp);
        //endregion*/
        return null;
    }
}
